home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / sun / awt / AWTCharset.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.0 KB  |  37 lines

  1. package sun.awt;
  2.  
  3. import java.nio.charset.Charset;
  4. import java.nio.charset.CharsetDecoder;
  5. import java.nio.charset.CharsetEncoder;
  6.  
  7. public class AWTCharset extends Charset {
  8.    protected Charset awtCs;
  9.    protected Charset javaCs;
  10.  
  11.    public AWTCharset(String var1, Charset var2) {
  12.       super(var1, (String[])null);
  13.       this.javaCs = var2;
  14.       this.awtCs = this;
  15.    }
  16.  
  17.    public boolean contains(Charset var1) {
  18.       return this.javaCs == null ? false : this.javaCs.contains(var1);
  19.    }
  20.  
  21.    public CharsetEncoder newEncoder() {
  22.       if (this.javaCs == null) {
  23.          throw new Error("Encoder is not supported by this Charset");
  24.       } else {
  25.          return new Encoder(this, this.javaCs.newEncoder());
  26.       }
  27.    }
  28.  
  29.    public CharsetDecoder newDecoder() {
  30.       if (this.javaCs == null) {
  31.          throw new Error("Decoder is not supported by this Charset");
  32.       } else {
  33.          return new Decoder(this, this.javaCs.newDecoder());
  34.       }
  35.    }
  36. }
  37.